<script>
function show_alert()
{
   alert("xxxxxx");
}
</script>
<div class="breadcrum">
    <p>
        <a href="#">Inventarisasi</a>
        <span></span><a href="{$config->site_url('inventarisasi/pengadaan')}">Pengadaan</a>
        <span></span><a href="{$config->site_url('inventarisasi/pengadaan/edit/')}/{$result_info.pengadaan_id}">Pengajuan Barang</a>
        <span></span><small>{$result_info.pengadaan_nomor|default:''}</small> 
    </p>
    <div class="clear"></div>
</div>
<div class="sub-nav-content">
    <ul>
        <li><a class="active" href="">Pengajuan Barang</a></li>
        <li><a href="{$config->site_url('inventarisasi/pengadaan/distribusi/')}/{$result_info.pengadaan_id}">Serah Terima / Distribusi</a></li> 
        <li><a href="{$config->site_url('inventarisasi/pengadaan/add')}">Tambah Pengadaan</a></li> 
    </ul>
    <div class="clear"></div>
    <div class="sub-content">
        <div class="table-info-box">
            <h3>No. Pengadaan - {$result_info.pengadaan_nomor|default:''}</h3>
            <table width="100%" class="table-info">
                <tbody>
                    <tr>
                        <th width="20%" valign="top">Bagian</th>
                        <td>{$result_info.bagian_name|default:''}</td>
                    </tr>
                    <tr>
                        <th>Manager</th>
                        <td>{$result_info.bagian_penanggungjawab|default:''}</td> 
                    </tr>  
                    <tr>
                        <th>Tanggal </th>
                        <td>{$dtm->get_full_date($result_info.pengadaan_date|default:'')}</td>
                    </tr>
                    <tr>
                        <th>Total </th>
                        <td id="total" style="color: red;"><b>Rp. {$total|number_format:0:",":"."}</b></td> 
                    </tr>
                    <tr>
                        <th>Keterangan</th>
                        <td>{$result_info.pengadaan_keterangan|default:''}</td>
                    </tr>
                </tbody>
            </table>
        </div>  
        <div class="clear"></div> 
        <div class="navigation"> 
            <div class="pageRow">
                <div class="pageNav">
                    <ul>
                        <li class="info"><strong>{$pagination.start|default:'0'} - {$pagination.end|default:'0'}</strong> dari <strong>{$pagination.total|default:'0'}</strong> Data</li>
                        {$pagination.data|default:''}
                    </ul>
                </div>
                <div class="clear"></div>
            </div>
            <div class="navigation-button">
                <ul>
                    <li><a href="{$config->site_url('inventarisasi/pengadaan/add_barang')}/{$result_info.pengadaan_id}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/add-icon.png">Tambah Barang</a></li> 
                    <li><a href="#"><img alt="" src="{$BASEURL}/resource/doc/images/icon/icon.notes.blue.png">Daftar Barang</a></li> 
                </ul>
                <div class="clear"></div>
            </div>
        </div>
        <!-- notification template -->
        {include file="base/templates/notification.html"}
        <!-- end of notification template--> 
        <table width="100%" class="table-view">
            <tbody>
                <tr>
                    <th width="3%">No</th>
                    <th width="35%">Nama</th> 
                    <th width="5%">Qty</th> 
                    <th width="10%">Perkiraan<br />Harga Satuan<br />(Rp)</th>
                    <th width="15%">Jumlah(Rp)</th> 
                    <th width="10%">Keterangan</th>
                    <th width="10%">Lokasi</th>  
                    <th width="12%"></th>
                </tr>  
                {assign var=numb value=1} 
                {foreach from=$rs_id key=no item=result}
                <tr {if ($no % 2) <> 0}class="blink-row"{/if}>
                    <td align="center">{$numb++}</td>
                    <td>{$result.pengajuanbarang_nama}</td>
                    <td align="center">{$result.pengajuanbarang_qty}</td>
                    <td align="right">{$result.pengajuanbarang_hargasatuan|number_format:0:",":"."}</td>
                    <td align="right">{{$result.pengajuanbarang_hargasatuan * $result.pengajuanbarang_qty}|number_format:0:",":"."}</td>
                    <td>{$result.pengajuanbarang_keterangan}</td>
                    <td>{$result.lokasi_name}</td> 
                    <td align="center">
                        <a href="{$config->site_url({'inventarisasi/pengadaan/edit_barang/'})}/{$result.pengadaan_id}/{$result.pengajuanbarang_id}" class="button-edit">Edit</a>
                        <a href="{$config->site_url({'inventarisasi/pengadaan/delete_barang/'})}/{$result.pengadaan_id}/{$result.pengajuanbarang_id}" class="button-hapus">Hapus</a>
                    </td>
                </tr>
                {foreachelse}
                <tr>
                    <td colspan="8">Data masih kosong</td>
                </tr>
                {/foreach}

            </tbody>
        </table> 
    </div>            
</div> 